.class public Lcom/instagram/creation/video/ui/CamcorderBlinker;
.super Landroid/widget/ImageView;
.source "CamcorderBlinker.java"

# interfaces
.implements Lcom/instagram/creation/video/a/d;
.implements Lcom/instagram/creation/video/c;


# instance fields
.field private a:Lcom/instagram/creation/video/a;

.field private b:Landroid/view/animation/Animation;

.field private c:I


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "context"

    .prologue
    .line 33
    invoke-direct {p0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 30
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/n/k;->a(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->c:I

    .line 34
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->d()V

    .line 35
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 38
    invoke-direct {p0, p1, p2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 30
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/n/k;->a(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->c:I

    .line 39
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->d()V

    .line 40
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 1
    .parameter "context"
    .parameter "attrs"
    .parameter "defStyle"

    .prologue
    .line 43
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    .line 30
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/n/k;->a(Landroid/content/Context;)I

    move-result v0

    iput v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->c:I

    .line 44
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->d()V

    .line 45
    return-void
.end method

.method private d()V
    .locals 2

    .prologue
    .line 48
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getContext()Landroid/content/Context;

    move-result-object v0

    sget v1, Lcom/facebook/ar;->camcorder_blinker:I

    invoke-static {v0, v1}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->b:Landroid/view/animation/Animation;

    .line 49
    return-void
.end method

.method private e()V
    .locals 6

    .prologue
    .line 61
    if-eqz p0, :cond_0

    iget-object v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->a:Lcom/instagram/creation/video/a;

    if-nez v0, :cond_1

    .line 79
    :cond_0
    :goto_0
    return-void

    .line 63
    :cond_1
    iget-object v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->a:Lcom/instagram/creation/video/a;

    invoke-virtual {v0}, Lcom/instagram/creation/video/a;->c()I

    move-result v0

    .line 64
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v2, Lcom/facebook/au;->blinker_initial_left_offset:I

    invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v1

    float-to-int v1, v1

    .line 66
    int-to-double v2, v0

    const-wide v4, 0x40cd4c0000000000L

    div-double/2addr v2, v4

    iget v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->c:I

    int-to-double v4, v0

    mul-double/2addr v2, v4

    int-to-double v4, v1

    sub-double/2addr v2, v4

    .line 68
    iget v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->c:I

    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getMeasuredWidth()I

    move-result v4

    sub-int/2addr v0, v4

    add-int v4, v0, v1

    .line 69
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    sget v1, Lcom/facebook/au;->camcorder_buttonbar_height:I

    invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v0

    float-to-int v0, v0

    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    sget v5, Lcom/facebook/au;->blinker_offset_from_buttonbar:I

    invoke-virtual {v1, v5}, Landroid/content/res/Resources;->getDimension(I)F

    move-result v1

    float-to-int v1, v1

    sub-int v5, v0, v1

    .line 72
    double-to-int v0, v2

    if-ge v0, v4, :cond_0

    .line 73
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout$LayoutParams;

    .line 74
    sget v1, Lcom/facebook/aw;->camcorder_root:I

    invoke-virtual {p0, v1}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/RelativeLayout;

    .line 75
    double-to-int v1, v2

    const/4 v2, 0x0

    neg-int v3, v4

    invoke-virtual {v0, v1, v2, v3, v5}, Landroid/widget/RelativeLayout$LayoutParams;->setMargins(IIII)V

    .line 76
    const/16 v1, 0xc

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    .line 77
    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    goto :goto_0
.end method

.method private f()V
    .locals 1

    .prologue
    .line 87
    iget-object v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->b:Landroid/view/animation/Animation;

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->startAnimation(Landroid/view/animation/Animation;)V

    .line 88
    const/4 v0, 0x0

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->setVisibility(I)V

    .line 89
    return-void
.end method


# virtual methods
.method public a()V
    .locals 0

    .prologue
    .line 122
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->c()V

    .line 123
    return-void
.end method

.method public a(Lcom/instagram/creation/video/a/e;)V
    .locals 1
    .parameter

    .prologue
    .line 127
    sget-object v0, Lcom/instagram/creation/video/a/e;->b:Lcom/instagram/creation/video/a/e;

    if-ne p1, v0, :cond_1

    .line 128
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->clearAnimation()V

    .line 132
    :cond_0
    :goto_0
    return-void

    .line 129
    :cond_1
    iget-object v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->a:Lcom/instagram/creation/video/a;

    invoke-virtual {v0}, Lcom/instagram/creation/video/a;->m()Z

    move-result v0

    if-nez v0, :cond_0

    .line 130
    iget-object v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->b:Landroid/view/animation/Animation;

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->startAnimation(Landroid/view/animation/Animation;)V

    goto :goto_0
.end method

.method public a(Lcom/instagram/creation/video/g/a;)V
    .locals 0
    .parameter

    .prologue
    .line 98
    return-void
.end method

.method public a(Lcom/instagram/creation/video/g/a;Lcom/instagram/creation/video/g/c;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 108
    sget-object v0, Lcom/instagram/creation/video/g/c;->c:Lcom/instagram/creation/video/g/c;

    if-ne p2, v0, :cond_0

    .line 109
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->c()V

    .line 113
    :goto_0
    return-void

    .line 111
    :cond_0
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->f()V

    goto :goto_0
.end method

.method public b()V
    .locals 1

    .prologue
    .line 52
    iget-object v0, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->a:Lcom/instagram/creation/video/a;

    invoke-virtual {v0}, Lcom/instagram/creation/video/a;->n()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 53
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->c()V

    .line 58
    :goto_0
    return-void

    .line 55
    :cond_0
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->f()V

    .line 56
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->e()V

    goto :goto_0
.end method

.method public b(Lcom/instagram/creation/video/g/a;)V
    .locals 0
    .parameter

    .prologue
    .line 102
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->f()V

    .line 103
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->e()V

    .line 104
    return-void
.end method

.method public c()V
    .locals 1

    .prologue
    .line 82
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->clearAnimation()V

    .line 83
    const/16 v0, 0x8

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->setVisibility(I)V

    .line 84
    return-void
.end method

.method public c(Lcom/instagram/creation/video/g/a;)V
    .locals 0
    .parameter

    .prologue
    .line 117
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->e()V

    .line 118
    return-void
.end method

.method public setClipStackManager(Lcom/instagram/creation/video/a;)V
    .locals 0
    .parameter "clipStackManager"

    .prologue
    .line 92
    iput-object p1, p0, Lcom/instagram/creation/video/ui/CamcorderBlinker;->a:Lcom/instagram/creation/video/a;

    .line 93
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/CamcorderBlinker;->e()V

    .line 94
    return-void
.end method
